let initData = {
    list: [],
    i: 0
}

let shopReducer = (state = initData, {type, payload}) => {

    switch(type) {
        case 'GET_SHOP_LIST':
            return {
                ...state,
                list: payload
            }
        case 'SET_INDEX':
            return {
                ...state,
                i: payload
            }
        default:
            return {
                ...state
            }
    }

}

export default shopReducer